<!DOCTYPE html>

{% load staticfiles %}

<html>

		<head>
				<title>Rango</title>
		</head>


		<body>
				<h1>Rango says...</h1>
				<div>
						hey there partner!<br />
						<strong>{{ boldmessage }}</strong><br />	
				</div>
				
				<div>
					<h2>Most Like Category:</h2>
					{% if categories %}
						<ul>

								{% for category in categories %}
								<li><a href="/rango/category/{{ category.slug }}/">{{ category.name }}</a></li>
								{% endfor %}
						</ul>
					{% else %}
						<strong>There are no categories present.</strong>

					{% endif %}
				</div>		
				

				<div>
					
					<h2>Most Views Pages:</h2>
					{% if pages %}
					<ul>
							{% for page in pages %}
							<li><a href="{{ page.url }}">{{ page.title }}</a></li>
							{% endfor %}
					</ul>
					{% else %}
					<strong>There are no pages present.</strong>
					{% endif %}

				</div>


				<div>
						<h2>Add the Category below</h2>
						<form id='category_form' method='post' action='/rango/add_category/'>
							
							{% csrf_token %}
							{% for hidden in form.hidden_fields %}
								{{ hidden }}
							{% endfor %}
							{% for field in form.visible_fields %}
								{{ field.errors }}
								{{ field.help_text }}
								{{ field }}
							{% endfor %}

							<input type='submit' name='submit' value='Create Category' />	
						</form>
						<a href='/rango/about/'>About</a><br />
						<img src="{% static "images/rango.jpg" %}" alt="Picture of Rango" />
				</div>
		</body>


</html>

